1. Field of the Invention
The present invention relates to a computer system using a virtual memory space, and more particularly to address translation of a virtual memory system.
2. Description of the Related Art
In a computer system using a virtual memory space, a user specifies an address of a memory using a virtual address of a virtual memory space. To access a real memory device such as a main storage, it is necessary to translate the virtual address into the real address of a real memory space. The term "real memory space" used throughout this specification includes those which can be considered as a real memory space on an operating system, e.g., a logical address space on a virtual machine.
Address translation is performed using a translation table indicating the relationship between virtual addresses and real addresses. Generally, a memory space is first divided into segments, and each segment is divided further into pages. Address translation is performed in accordance with a segment-page arrangement, using a segment table and a page table. Address translation is usually made simple by using the same lower bits both for the virtual and the real addresses.
Each entry of a segment table specifies an address of a page table, and each page table defines a plurality of pages within the specified address space. An entry of a page table can specify an address of a page frame allocated in a main storage. The size of a segment or a page is determined considering effective use of real storage, efficiency of block transfer between an auxiliary storage and a main storage, and the like. In view of the fact that factors to be considered become different depending upon the respective computer system, there is known a system in which the size of a segment is changed for each virtual address space by means of an address translation control register.
In a system having a large memory capacity (2 giga bytes) whose virtual addresses are represented by 31 bits, the size of the address area associated with an address translation table becomes large. Here, the term "giga byte" represents 1024 mega bytes in strict meaning. Similarly, "kilo bytes" represents 1024 bytes and "mega byte" represents 1024 kilo bytes. If a segment having 64 kilo bytes is employed so as to use a memory in finer units, the number of entries of the segment table becomes 32,768. If a segment having one mega byte is employed so as to make the size of the segment table small, the memory must be used in units of one mega byte although the number of entries is reduced to 2048. For instance, when 3.1 mega bytes are to be used, a memory space of 4 mega bytes must be occupied. JP-A-58-189892 has proposed that the system common portion and the user dedicated portion are freely allocated on an address space in units of segments. However, the loss of virtual memory size at a segment division point has not been considered.